From 680963aa78d9f9e820eb83e247b3ad0cb05c2070 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 31 Jan 2007 16:54:21 +0000 Subject: [PATCH] [XEN] Fix dom/sysctl structure alignement. Versions of gcc up to and including 3.3 appear to ignore __attribute__((align(x))) when applied to typedefs or to members of anonymous unions. Workaround this by explicitly aligning each definition of a 64 bit guest handle. Tidy up x86_64 compat entry.S a bit. Signed-off-by: Ian Campbell --- xen/arch/x86/x86_64/compat/entry.S | 7 ++----- xen/include/public/arch-x86/xen-x86_32.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/x86_64/compat/entry.S b/xen/arch/x86/x86_64/compat/entry.S index dadd1abe65..070deec3d1 100644 --- a/xen/arch/x86/x86_64/compat/entry.S +++ b/xen/arch/x86/x86_64/compat/entry.S @@ -281,9 +281,6 @@ CFIX14: .quad CFLT14,CFIX14 .previous -compat_domctl: -compat_sysctl: - .section .rodata, "a", @progbits ENTRY(compat_hypercall_table) @@ -365,8 +362,8 @@ ENTRY(compat_hypercall_args_table) .byte 2 /* compat_event_channel_op */ .byte 2 /* compat_physdev_op */ .byte 2 /* do_hvm_op */ - .byte 1 /* compat_sysctl */ /* 35 */ - .byte 1 /* compat_domctl */ + .byte 1 /* do_sysctl */ /* 35 */ + .byte 1 /* do_domctl */ .byte 2 /* compat_kexec_op */ .rept NR_hypercalls-(.-compat_hypercall_args_table) .byte 0 /* compat_ni_hypercall */ diff --git a/xen/include/public/arch-x86/xen-x86_32.h b/xen/include/public/arch-x86/xen-x86_32.h index 6728b818cd..2633ff082f 100644 --- a/xen/include/public/arch-x86/xen-x86_32.h +++ b/xen/include/public/arch-x86/xen-x86_32.h @@ -103,7 +103,7 @@ (hnd).p = val; \ } while ( 0 ) #define uint64_aligned_t uint64_t __attribute__((aligned(8))) -#define XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name +#define XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name __attribute__((aligned(8))) #endif #ifndef __ASSEMBLY__ -- 2.30.2